using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using sfcms.api;

public partial class sfcms_sfcms_editplaceholdercontents : webpagebase
{
    protected override void Page_Load()
    {
        // placeholder currentplaceholder = placeholder.bypageandcontrolid(Convert.ToInt64(Request.QueryString["pageID"]), Request.QueryString["controlID"]);

        if (sfcms.api.user.current == null)
        {
            Response.Write("<script>window.opener.window.document.location.href = '/';self.close();</script>");
            return;
        }

        //if (!IsPostBack)
        //{
        //    eweInitialContent.InnerHtml = Server.HtmlDecode(currentplaceholder.content);
        //}
        //else
        //{
        //    if (currentplaceholder == null)
        //    {
        //        currentplaceholder = new placeholder();
        //        currentplaceholder.pageid = Convert.ToInt64(Request.QueryString["pageID"]);
        //        currentplaceholder.controlid = Request.QueryString["controlID"];
        //        currentplaceholder.content = editedContent.Value;
        //    }

        //    currentplaceholder.content = editedContent.Value;
        //    currentplaceholder.save();

        //    Response.Clear();
        //    Response.Write("<script>window.opener.window.document.location.reload();self.close();</script>");
        //}

    }
}
